#ifndef NF_SOCS_ADDR_OPT_H
#define NF_SOCS_ADDR_OPT_H
#include <linux/in.h>
#include <linux/in6.h>
#include "socs/comm/types.h"

typedef union socs_addr {
	struct in_addr ipv4;
	struct in6_addr ipv6;
} socs_addr_t;

int addr_6to4(struct in6_addr *src, struct ipv6_prefix *prefix, struct in_addr *dst);

int str_to_addr4(const char *str, struct in_addr *result);
int str_to_addr6(const char *str, struct in6_addr *result);
/*the ipv6_addr_cmp is in include/net/ipv6.h*/
int ipv4_addr_cmp(const struct in_addr *a1, const struct in_addr *a2);
int addr_cmp(int family, const void *address1, const void *address2);
int addr_cmp_prefix(int family, const void *address1, const void *address2, int prefix);
int ifaddr_to_multaddr(const struct in6_addr *ifaddr, struct in6_addr *result);

#endif
